<template>
    <div>
        <h1>嵌套路由 我是你爸爸</h1>
        <router-link to ='/son'>
        <button>儿子快来</button>
        </router-link>
        <router-link to ='/dauther'>
        <button>再来一个女儿</button>
        </router-link>
        <router-view></router-view>
        <h3>历史记录</h3>
    <button @click='gohead()'>前进</button>
    <button @click="back()">后退</button>
    </div>
</template>
<script>
export default {
   methods:{
        gohead(){
      this.$router.go(1);
    },
    back(){
      this.$router.go(-1);
    }
   }
    
}
</script>